<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <section>
        <img src="stars.png" id="stars">
        <img src="moon.png" id="moon">
        <img src="mountains_behind.png" id="mountains_behind">
        <h2 id="text">Anime<span>JS</span></h2>
        <a href="#" id="btn">Play</a>
        <img src="mountains_front.png" id="mountains_front">
    </section>


    <script src="anime.min.js"> </script>
    <script>
        // 使用默认参数创建aaa
        var animation = anime.timeline({
            autoplay: false
        });


        //添加了一行注释，实验git

        var time = 500;

        animation
            .add({
                targets: '#btn',
                top: '2000px',
                duration: 500,
                easing: 'easeInOutSine',
            })

            .add({
                targets: '#stars',
                top: '0px',
                duration: time,
                easing: 'easeInOutSine',
            })

            .add({
                targets: '#mountains_behind',
                bottom: '0px',
                duration: time,
                easing: 'easeInOutSine',
            })

            .add({
                targets: '#moon',
                top: '0px',
                duration: time,
                easing: 'easeInOutBack',
            })

            .add({
                targets: '#mountains_front',
                bottom: '0px',
                duration: time,
                easing: 'easeInOutSine',
            })

            .add({
                targets: '#text',
                marginRight: '0px',
                duration: time,
                easing: 'easeInOutBack',
            })

            .add({
                targets: '#btn',
                top: '50%',
                duration: time,
                easing: 'easeInOutBack',
            })



        document.querySelector('#btn').onclick = animation.play
    </script>
</body>

</html>